<%@ page language="java"
         contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"
         import="com.shxt.hotel.background.*"
         import="java.util.Map"
         import="java.util.List"
%>
<%
	Staff staffManager = new Staff();

    if(session.getAttribute("staff_id") == null){
        response.sendRedirect("./login.jsp");
    }else{
        // get current Staff
        request.setCharacterEncoding("UTF-8");
        int staff_id = (int)session.getAttribute("staff_id");
        
        Map<String, Object> currentStaff = staffManager.getStaffInfo(staff_id).get(0);
%>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Mosaddek">
    <link rel="shortcut icon" href="../Public/img/favicon.html">

    <title>Sub Overview</title>

    <!-- Bootstrap core CSS -->
    <link href="../Public/css/bootstrap.min.css" rel="stylesheet">
    <link href="../Public/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="../Public/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <!-- Custom styles for this template -->
    <link href="../Public/css/style.css" rel="stylesheet">
    <link href="../Public/css/style-responsive.css" rel="stylesheet" />

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
      <script src="../Public/js/html5shiv.js"></script>
      <script src="../Public/js/respond.min.js"></script>
    <![endif]-->
</head>

<body>

    <section id="container" class="">
        <!--header start-->
        <jsp:include page="./Public/header.jsp" flush="true"/>
        <!--header end-->
        <!--sidebar start-->
        <jsp:include page="./Public/sidebar.jsp" flush="true"/>
        <!--sidebar end-->
        <!--main content start-->
        <section id="main-content">
            <section class="wrapper">
                <!-- page start-->
                <div class="row state-overview">
                    <div class="col-lg-3">
                        <section class="panel">
                            <div class="symbol red">
                                <i class="icon-usd"></i>
                            </div>
                            <div class="value">
                                <h1>140</h1>
                                <p>Renewal cost</p>
                            </div>
                        </section>
                    </div>
                </div>
                <div class="row">
                    <div class="col-lg-3">
                        <%
                            request.setCharacterEncoding("UTF-8");
                            String id = request.getParameter("id");
                            String renewal = request.getParameter("renewal_day");
                        %>
                        <a href='./background/sub_renewal_do.jsp?id=<%=id %>&renewal=<%=renewal %>'>
                            <button type="button" class="btn btn-info">Renewal</button>
                        </a>
                    </div>
                </div>
                <!-- page end-->
            </section>
        </section>
        <!--main content end-->
    </section>

    <!-- js placed at the end of the document so the pages load faster -->
    <script src="../Public/js/jquery.js"></script>
    <script src="../Public/js/bootstrap.min.js"></script>
    <script src="../Public/js/jquery.scrollTo.min.js"></script>
    <script src="../Public/js/jquery.nicescroll.js" type="text/javascript"></script>
    <script type="text/javascript" src="../Public/assets/data-tables/jquery.dataTables.js"></script>
    <script type="text/javascript" src="../Public/assets/data-tables/DT_bootstrap.js"></script>


    <!--common script for all pages-->
    <script src="../Public/js/common-scripts.js"></script>

    <!--script for this page only-->
    <script src="../Public/js/dynamic-table.js"></script>
    
    <!--scripted by myself-->
    <script>
        // $(document).ready(function(){
        //     $("#Hotel_Subscribe").addClass("active");
        //     $("#sub_overview").addClass("active");
        // });
    </script>

</body>

</html>
<%
    }
%>